A conventional electronic cigarette automatically controls the opening and closing of the electronic cigarette by detecting the suction action of a user, by a sensor arranged in an airflow passage adjacent to an air inlet. However, as the heating member is also located in the airflow passage, and the sensor is located between the heating member and the air inlet, the suction of the user is hindered by the heating member, and thus a greater suction force is needed to allow the airflow in the airflow passage cause air pressure for the detection by the sensor. On the other hand, since the heating member is in liquid communication with a smoke liquid storage member, the smoke liquid in the smoke liquid storage member may leak into the airflow passage through the heating member, and leaked smoke liquid may block the air inlet. Therefore, the air outside of the electronic cigarette may be blocked from entering into the airflow passage, thus affecting the detection by the sensor. Additionally, the leaked smoke liquid may enter into the sensor, which would cause the sensor to short-circuit. In addition, there may be residual smoke in the airflow passage that can cause the airflow passage to be humid. The sensor over a long period under such environment may affect its service life.